package cn.xsw.entity.query;

import cn.xsw.entity.Business;
import cn.xsw.utils.BaseQuery;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
public class BusinessCategoryQuery extends BaseQuery<Business> {

    @ApiModelProperty(value = "是否查询所有，0:查询所有 1:只查询主页数据 默认：0",example = "0")
    private Integer isIndex;
    public BusinessCategoryQuery(){
        this.isIndex = 0;
    }
    // 条件
    public QueryWrapper wrapper() {
        QueryWrapper<Business> wrapper = new QueryWrapper<>();
        if (isIndex==1) wrapper.eq("is_index", this.isIndex);
        return wrapper;
    }
}
